/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ik.pbs.Random;

import java.util.Random;

/**
 *
 * @author alexis
 */
public class Aleatoreo {
    
    public Aleatoreo(){
    }

    public String RandomString(int caracteres) {

        char[] chars = "abcdefghijklmnopqrstuvwxyz0123456789".toCharArray();
        StringBuilder sb = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < caracteres; i++) {
            char c = chars[random.nextInt(chars.length)];
            sb.append(c);
        }
        String output = sb.toString();
        return output;
    }
}
